﻿package java_45;

import java.util.Scanner;

public class test {
	public static void main(String[] args) {
		Scanner input=new Scanner(System.in);
		System.out.println("请输入要领养宠物的名字");
		String name=input.next();
		System.out.println("请选择类型(1.狗狗2.企鹅)");
		switch(input.nextInt()){
		case 1:
			System.out.println("请选择狗狗品种1.拉布拉多2.酷酷薛瑞娜");
			String strain=null;
			if (input.nextInt()==1) {
				strain="聪明的拉布拉多";
			}else{
				strain="酷酷薛瑞娜";
			}
			DOG dog=new DOG();
			dog.name=name;
			dog.strain=strain;
			dog.print();
			break;
		case 2:
			System.out.println("请选择企鹅性别(1.Q仔2.Q妹)");
			String sex=null;
			if (input.nextInt()==1) {
				sex="Q仔";
				else
					sex="Q妹";
				penguin pgn=new penguin();
				pgn.name=name;
				pgn.sex=sex;
				pgn.print();
			}
		}
	}
}
